package org.JQbitorrentClinet.request.application;

import com.google.gson.Gson;
import lombok.Builder;
import org.JQbitorrentClinet.base.BasePostMultiPartParam;
import org.JQbitorrentClinet.pojo.application.ApplicationPreferences;

import java.util.HashMap;
import java.util.Map;


@Builder
public class SetApplicationPreferencesParam extends BasePostMultiPartParam {

    ApplicationPreferences applicationPreferences;

    @Override
    public Map getParamMap() {
        Map<String, Object> params = new HashMap<>();
        params.put("json", new Gson().toJson(applicationPreferences));
        return params;
    }

    @Override
    public String getApiUrl() {
        return "/api/v2/app/setPreferences";
    }
}
